package com.handyshop.mall.dubbo.commodity.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.handyshop.mall.dubbo.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@ApiModel(value = "商品类目表")
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "nrs_cat")
public class Cat extends BaseEntity {
    /**
     * 父类ID
     */
    @TableField(value = "parent_id")
    @ApiModelProperty(value = "父类ID")
    private Long parentId;

    /**
     * 分类名称
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value = "分类名称")
    private String name;

    /**
     * 路径
     */
    @TableField(value = "`path`")
    @ApiModelProperty(value = "路径")
    private String path;

    /**
     * 是否存在子类（1：是；0：否）
     */
    @TableField(value = "has_children")
    @ApiModelProperty(value = "是否存在子类（1：是；0：否）")
    private Boolean hasChildren;

    /**
     * 同级排序
     */
    @TableField(value = "sort")
    @ApiModelProperty(value = "同级排序")
    private Integer sort;

    /**
     * 是否屏蔽（1：是；0：否）
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "是否屏蔽（1：是；0：否）")
    private Boolean status;

    public static final String COL_ID = "id";

    public static final String COL_PARENT_ID = "parent_id";

    public static final String COL_NAME = "name";

    public static final String COL_PATH = "path";

    public static final String COL_HAS_CHILDREN = "has_children";

    public static final String COL_SORT = "sort";

    public static final String COL_STATUS = "status";

    public static final String COL_DELETE_FLAG = "delete_flag";

    public static final String COL_CREATOR_ID = "creator_id";

    public static final String COL_CREATOR = "creator";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_MODIFY_TIME = "modify_time";
}